package site.jlopen.kuscia.model.task.param;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import lombok.Getter;
import lombok.Setter;
import site.jlopen.kuscia.model.task.param.clusterDevices.SfClusterDescDevices;

@Getter
@Setter
public class SfClusterDesc {

	private List<String> parties;

	private List<SfClusterDescDevices> devices;

	private Map<String, Object> ray_fed_config;
	
	public SfClusterDesc addPartie(String partie) {
		if(null == this.parties) {
			this.parties = new ArrayList<String>();
		}
		this.parties.add(partie);
		return this;
	}
	
	public SfClusterDesc addDevice(SfClusterDescDevices device) {
		if(null == this.devices) {
			this.devices = new ArrayList<SfClusterDescDevices>();
		}
		this.devices.add(device);
		return this;
	}
	
	public SfClusterDesc addMapConfig(String key, Object value) {
		if(null == this.ray_fed_config) {
			this.ray_fed_config = new HashMap<String, Object>();
		}
		this.ray_fed_config.put(key, value);
		return this;
	}
	
}
